package my.oldertests;

import java.math.BigInteger;
import java.util.*;
abstract class boss{
	int a;
	abstract void print();
};
class xd extends boss{
	public void print(){System.out.println("hello" + a);}
	public final void add(int a,int b){
		this.a=a+b;
		print();
	} 
};
class xxxd extends xd{
	
}
public class helloworld {

	/**
	 * @param args
	 */
	int z=0;
	int d=0;
	@SuppressWarnings("unused")
	private int add(int a,int b){return a+b;}
	private static double f(double x){return x+x*x+x*x*x+1;}
	public static void main(String[] args) {
		Map<String,String> fck=System.getenv();
		System.out.println(fck);
		for(int i=0;i<100;i++)
			System.out.println(System.nanoTime()%10);
		// TODO Auto-generated method stub
		System.out.println("hello world:");
		System.out.println(new Date());
		for(int i=0;i<10;i++)
		{
			System.out.println(i);
		}
		BigInteger a = new BigInteger("12");
		System.out.println(a.pow(20));
		Integer b=2,c=3;
		b+=2;
		System.out.println(b<<2);
		System.out.println(b<<34);
		System.out.println((int)3.5);
		System.out.println((int)(-3.5));
		swap(b,c);
		//f(b.intValue());
		helloworld xxx=new helloworld();
		xxx.ff();
		xxx.ff();
		java.util.ArrayList<BigInteger> s = new java.util.ArrayList<BigInteger>(100);
		s.add(a);
		boss tmp = new xd();
		tmp.print();
		double f=1.5;
		System.out.println(f(f));
		helloworld obj = new helloworld();
		Random ss= new Random();
		for(int i=0;i<20;i++)
			System.out.print( Math.abs(ss.nextInt())%100 + " " );
		
		int[][] aa = new int[4][5];
		System.out.println("length a is " +aa.length);
		Integer[] bb = new Integer[20];
		obj.testmodif(bb);
		obj.pr(bb);
		Arrays.sort(bb,new cmp());
		obj.pr(bb);
		obj.testmodif();
	}
	static class cmp implements Comparator< Integer >{

		public int compare(Integer arg0, Integer arg1) {
			return Integer.bitCount(arg0.intValue())-Integer.bitCount(arg1.intValue());
		}
		
	}
	void ff(){
		System.out.println(z++);
		System.out.println(d);
		System.out.println(d+d);
	}
	static void swap(Integer x,Integer y){
		Integer t=x;
		x=y;
		y=t;
	}
	void pr(Integer[] x){
		for(int i=0;i<x.length;i++)
		{
			System.out.print(x[i] + " ");
		}
		System.out.println();
		
	}
	void testmodif(){
		System.out.println("hello");
	}
	void testmodif(Integer[] x){
		System.out.println("x.length = " + x.length);
		for(int i=0;i<x.length;i++)
			x[i]=(int) Math.round(Math.random()*100);
	}
}
